{extend name="wap/default/base" /}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/control_type.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/goods_list.css">
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/group_buy.css">
<style type="text/css">
.custom-search-button{top: 1px;}
.sliding {overflow-y: auto;background: #ffffff;}
.sliding::-webkit-scrollbar {display: none;}
.sliding ul {white-space: nowrap;text-align: center;}
.sliding ul li {padding: 10px 10px 0 10px;display: inline-block;background: #ffffff;border-right: 2px solid #f8f8f8;width:25%;}
.sliding ul li img{width:60px;height:60px;}
.members_goodspic{border-bottom:1px solid #f3f3f3;}
.info p.goods-title{padding-top:10px;}
.info p.goods-price{margin:0;margin-bottom:8px;}
.controltype{height:35px;margin:0;width:100%;line-height:32.5px;}
.controltype>.control_l_content{top:0;background: none;}
.info p.goods-price>em{font-size:12px;font-weight:bold;color:#f23030;}
.popup{
	    background: none;
		padding:0;
}
.code{
	
    width: 60%;
    margin: 0 auto;
    background: #fff;
    border-radius: 13px;
}
.controltype>.control_l_content {
    width: 34%;
}
.members_goodspic>ul>li.gooditem>div.info {
     margin-top: 0px; 
}
.com-content{
	min-height:600px;
}
</style>
{/block}

{block name="goodsHead"}
<!-- 标识：是否显示顶部关注  0：[隐藏]，1：[显示]-->
{if condition="$is_subscribe == 1"}
<div class="fixed-focus-on">
	<i class="close" onclick="$('.fixed-focus-on').hide();">x</i>
	<div class="foucs-on-block">
		{if condition="$source_img_url != ''"}
		<img class="user-bg" src="__UPLOAD__/{$source_img_url}">
		{else/}
		<img class="user-bg" src="__TEMP__/{$style}/public/images/default/default_shop_avatar.png">
		{/if}
		{if condition="$source_user_name != ''"}
		<p>我是你的好友<span>{$source_user_name}</span>,推荐给您让生意从此做好</p>
		{else/}
		<p>您当前还未关注微信公众账号，请点击关注</p>
		{/if}
		<button id="subscribe">点击关注</button>
	</div>
</div>
{/if}


<!-- 遮罩层 -->
	<div class="shade" style="position:fixed;top:0px;left:0px;width:100%;height:100%;margin-top:0;background: rgba(0, 0, 0, 0.7);z-index: 999;display:none;"><span style="float: right; padding: 15px;font-size: 22px;color: #fff;background: transparent;" id="close">X</span></div>
<!-- 弹出层 --> 
	<div class="popup" style="position:fixed;top: 36%;left: 0px;width: 100%;height: 100%;margin-left:0px;display:none;">
		
		<div class="code">
			<div style="overflow: hidden;">
			   <img src="__ROOT__/{$web_info.web_qrcode}"  style="max-width: 100%;margin-top: 10px;"/>
			   <div style="color:#666; margin-bottom: 10px;">长按二维码关注公众微信</div>
			</div>
		</div>
	</div>



{/block}

{block name="main" }
{include file='wap/default/share'/}

<div class="com-content">

<!-- 搜索 -->
<div style="width: 100%;background-color: #fff;padding: 10px 0px;">
	{include file='wap/default/Index/controlSearch'/}
	<style>.custom-search-button{top:0;}</style>
</div>
<!-- 轮播图 -->
{include file='wap/default/Index/controlSlide'/}

<!-- 公告 -->
{include file='wap/default/Index/controlNotice' /}
<!-- 导航 -->
{include file='wap/default/Index/controlNav'/}

<!-- 优惠券领取 -->
 {if condition="count($coupon_list) gt '0'"} 
   {include file='wap/default/Index/controlCoupon'/}
 {/if} 

{if condition="count($discount_list) >0"}
{include file='wap/default/Index/controlDiscount'/}
{/if}



{foreach name="class_list" item="class"}
	
	<div class="controltype">
		<img src="__TEMP__/{$style}/public/images/hotsale.png"/>
		<span class="control_l_content" style="color:#16D810;">{$class.class_name}</span>
<!-- 		<img src="__TEMP__/{$style}/public/images/navimg/top_selling.png"> -->
	</div>
	<section class="members_goodspic">
		<ul>
		{if !empty($class.goods_list)}
			{foreach name="class.goods_list" item="goods" key = "k"}
			{if condition="$k<4" }
				<li class="gooditem">
					<div class="imgs">
						<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}">
						<img class="lazy" src="__UPLOAD__/{$goods.picture_info.pic_cover_small}" style="max-width:100%;">
						</a>
					</div>
					<div class="info">
						<p class="goods-title"><a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}">{$goods.goods_info.goods_name}</a></p>
						<p class="goods-price"><em>￥{$goods.goods_info.promotion_price}</em></p>
						<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"></a>
					</div>
				</li>
			{/if}
			{/foreach}
		{else/}
			<li style="text-align:center;height: 130px;">
				<img src="__TEMP__/{$style}/public/images/commend-type.png" style="max-width: 80px;vertical-align: middle;margin: 10px 0 2px 0;"/>
				<div style="text-align:center;color:#666;margin-top: 10px;">还没有商品哦</div>
			</li>
		
		{/if}
		</ul>
	</section>
	
{/foreach}

<!-- {foreach name="class_list" item="class"} -->
<!-- 	{if $class.class_name=='商城热卖'} -->

	
	
<!-- 	<div class="controltype"> -->
<!-- 		<!-- <img src="__TEMP__/{$style}/public/images/shophot.png"/> --> 
<!-- 		<!-- <span class="control_l_content" style="color:red;">{$class.class_name}</span> --> 
<!-- 		<img src="__TEMP__/{$style}/public/images/navimg/hot_commodity.png"> -->
<!-- 	</div> -->
<!-- 	<section class="members_goodspic"> -->
<!-- 		<ul> -->
<!-- 			{foreach name="class.goods_list" item="goods" key = "k"} -->
<!-- 			{if condition="$k<4" } -->
<!-- 			<li class="gooditem"> -->
<!-- 				<div class="img"> -->
<!-- 					<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"><img class="lazy" src="__UPLOAD__/{$goods.picture_info.pic_cover_small}"></a> -->
<!-- 				</div> -->
<!-- 				<div class="info"> -->
<!-- 					<p class="goods-title"><a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}">{$goods.goods_info.goods_name}</a></p> -->
<!-- 					<p class="goods-price"><em>￥{$goods.goods_info.promotion_price}</em></p> -->
<!-- 					<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"></a> -->
<!-- 				</div> -->
<!-- 			</li> -->
<!-- 			{/if} -->
<!-- 			{/foreach} -->
<!-- 		</ul> -->
<!-- 	</section> -->
<!-- 	{/if} -->
<!-- {/foreach} -->

<!-- {foreach name="class_list" item="class"} -->
<!-- 	{if $class.class_name=='商城推荐'} -->
<!-- 	<div class="controltype"> -->
<!-- 	<!-- <img src="__TEMP__/{$style}/public/images/shoprec.png"/> --> 
<!-- 	<!-- <span class="control_l_content" style="color:red;">{$class.class_name}</span> --> 
<!-- 	<img src="__TEMP__/{$style}/public/images/navimg/mall_recommend.png"> -->
<!-- 	</div> -->
<!-- 	<section class="members_goodspic"> -->
<!-- 		<ul> -->
<!-- 			{foreach name="class.goods_list" item="goods" key = "k"} -->
<!-- 			{if condition="$k<4" } -->
<!-- 			<li class="gooditem"> -->
<!-- 				<div class="img"> -->
<!-- 					<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"><img class="lazy" src="__UPLOAD__/{$goods.picture_info.pic_cover_small}"></a> -->
<!-- 				</div> -->
<!-- 				<div class="info"> -->
<!-- 					<p class="goods-title"><a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}">{$goods.goods_info.goods_name}</a></p> -->
<!-- 					<p class="goods-price"><em>￥{$goods.goods_info.promotion_price}</em></p> -->
<!-- 					<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"></a> -->
<!-- 				</div> -->
<!-- 			</li> -->
<!-- 			{/if} -->
<!-- 			{/foreach} -->
<!-- 		</ul> -->
<!-- 	</section> -->
<!-- 	{/if} -->
<!-- {/foreach} -->
<!-- 促销模块 -->
<!-- {foreach name="class_list" item="class"}
	<div class="controltype" style="background-image:url(__TEMP__/{$style}/public/images/newproduct.png);background-repeat:no-repeat;height:50px;margin:0;width:100%">
		<hr />
		<span class="control_l_content">{$class.class_name}</span>
	</div>
	<div class="slick">
		<div><a href="APP_MAIN"><img src="__TEMP__/{$style}/public/images/guanggao_cs_02.jpg" alt=""></a></div>
	</div>
	<section class="members_goodspic">
		<ul>
			{foreach name="class.goods_list" item="goods" key = "k"}
			{if condition="$k<4" }
			<li class="gooditem">
				<div class="img">
					<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"><img class="lazy" src="__UPLOAD__/{$goods.picture_info.pic_cover_small}"></a>
				</div>
				<div class="info">
					<p class="goods-title"><a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}">{$goods.goods_info.goods_name}</a></p>
					<p class="goods-price"><em>￥{$goods.goods_info.promotion_price}</em></p>
					<a href="APP_MAIN/goods/goodsdetail?id={$goods.goods_info.goods_id}"><div class="goods-buy"></div></a>
				</div>
			</li>
			{/if}
			{/foreach}
		</ul>
	</section>
{/foreach} -->
</div>
	<div class="nav-pic">
	<a  href="javascript:void(0);" class="wap"><span><i></i></span>
	<p>手机版</p></a>
	<a  href="SHOP_MAIN/index/index?default_client=shop" class="pc"><span><i></i></span>
	<p>电脑版</p></a>
	</div>
{/block}
 {block name="javascript"}
 <script>
$(function(){
	//关注微信公众号弹出
	$("#subscribe").click(function(){
		
		$(".shade").show();
		$(".popup").show();
	})
	//关注微信公众号关闭
	$("#close").click(function(){
		$(".shade").hide();
		$(".popup").hide();
		
	})
	
	
	$.ajax({
		type:"post",
		url : "APP_MAIN/member/getShareContents",
		success : function(data){
			//alert(JSON.stringify(data));
			//document.write(data.share_img);
			/* $("#share_title").val(data['share_title']);
			$("#share_desc").val(data['share_contents']);
			$("#share_url").val(data['share_url']);
			$("#share_img_url").val(data['share_img']);\ */
			{include file='wap/default/shareContents'/}
		}
	})
})
</script>
{/block}